//
//  EmailViewController.m
//  SelectionForYou
//
//  Created by qianfeng on 15-6-15.
//  Copyright (c) 2015年 朱共营. All rights reserved.
//

#import "EmailViewController.h"
#import <MessageUI/MessageUI.h>
@interface EmailViewController ()<MFMailComposeViewControllerDelegate>

@end

@implementation EmailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    if ([MFMailComposeViewController canSendMail]){
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto://zhugy781@163.com"]];
    
    }else{
        UIAlertView *alter=[[UIAlertView alloc] initWithTitle:@"警告" message:@"您的邮件功能未打开" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
        [alter show];
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
